function LoadShowContent(contents, callback) {
    $('#main').append(template('t_showContent'))
    var contentsLen = contents.length
    var index = 0
    showStrs()
    var timer1, timer2

    function showStrs() {
        timer2 = setTimeout(function() {
            $('#showContent').append('<br>&nbsp;&nbsp;')
            showStr(index, function() {
                if (index >= contentsLen) {
                    clearTimeout(timer2)
                    callback()
                    return
                }
                showStrs()
            })
            index += 1
        }, 1000)
    }

    function showStr(index, cb) {
        var content = contents[index]
        var contentLen = content.length
        var j = 0
        timer1 = setInterval(function() {
            $('#showContent').append(content.substr(j, 1))
            j += 1
            if (j >= contentLen) {
                clearInterval(timer1)
                cb()
            }
        }, 150)
    }


    //获取字符串长度
    function getStrLength(str) {
        ///<summary>获得字符串实际长度，中文2，英文1</summary>
        ///<param name="str">要获得长度的字符串</param>
        var realLength = 0,
            len = str.length,
            charCode = -1;
        for (var i = 0; i < len; i++) {
            charCode = str.charCodeAt(i);
            if (charCode >= 0 && charCode <= 128) realLength += 1;
            else realLength += 2;
        }
        return realLength;
    }
}
